@extends('admin.master')
@section('title', '设备故障记录')
	
@section('firstItem')
@parent
				<span>设备故障记录</span>
				<input class="a_indexbg" type="hidden" value="index" />
				
@stop
@section('searchList')
@parent
				<div class="seizeBox"></div>
@stop
@section('dataTables')
@parent
			<table class="accountManageTable dataTables" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
						<td>序号</td>
						<td>故障编码</td>
						<td>故障信息</td>
						<td>设备编号</td>
						<td>用户名</td>
						<td>手机号码</td>
						<td>经销商</td>
						<td>记录时间</td>
					</tr>
				</thead>
				<tbody>
				@for($i=0, $faultCount=count($faults); $i<$faultCount; $i++)
					<tr >
						<td>{{ $i+1 }}</td>
						<td>{{ 'E'.$faults[$i]->fault_code }}</td>
						<td>{{ $faults[$i]->device_fault_description }}</td>
						<td>{{ $faults[$i]->device->code }}</td>
						<td>{{ isset($faults[$i]->device->installInfo)? $faults[$i]->device->installInfo->customer_name: '未录入' }}</td>
						<td>{{ isset($faults[$i]->device->installInfo)? $faults[$i]->device->installInfo->phone: '未录入' }}</td>
						<td>{{ isset($faults[$i]->device->installInfo)? $faults[$i]->device->installInfo->dealer: '未录入' }}</td>
						<td>{{ $faults[$i]->created_at }}</td>
					</tr>
				@endfor
				</tbody>
			</table>
@stop
@section('page_num')
<ul class="pagination pagination-lg"> 
	{!! $faults->render() !!}
</ul>	
<script type="text/javascript">
	$(".deviceHitch").css("backgroundColor","#224247").siblings().css("backgroundColor","#365d62");
</script>		
@stop